package com.example.flower_shop.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
@Schema(description = "用户请求对象")
public class UserReqVO {
    /**
     * 姓名
     */
    @NotBlank(message = "昵称不能为空")
    @Schema(description = "用户昵称", required = true)
    private String nickname;

    /**
     * 年龄
     */
    @NotNull(message = "年龄不能为空")
    @Schema(description = "用户年龄", required = true, example = "25")
    private Integer age;

    /**
     * 性别 男 1 女 2 不详 3
     */
    @NotNull(message = "性别不能为空")
    @Schema(description = "用户性别 男 1 女 2 不详 3", required = true, example = "1")
    private Integer gender;
    /**
     * 完整地址
     */
    @Schema(description = "用户完整地址")
    private String address;

    /**
     * 头像
     */
    @Schema(description = "用户头像")
    private String avatar;

    /**
     * 手机
     */
    @Schema(description = "用户手机号码", required = true)
    @Pattern(regexp = "^1[34578]\\d{9}$", message = "请输入正确的手机号")
    @NotBlank(message = "请设置手机号信息")
    private String phone;

    /**
     * 邮箱
     */
    @Schema(description = "用户邮箱", required = true)
    @NotBlank(message = "请设置邮箱信息")
    @Pattern(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", message = "清输入正确的邮箱")
    private String email;

    /**
     * 备注
     */
    @Schema(description = "备注信息")
    private String remark;
}
